package br.com.moxirpt.model.vo.reintrodterapia;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import br.com.moxirpt.form.FormUtil;
import br.com.moxirpt.model.log.Form;
import br.com.moxirpt.model.vo.Resumo;

	@SuppressWarnings("serial")
	@Entity
	@Table(name = "data.vw_reintrodterapia_resumo")
	@NamedQueries({			
		@NamedQuery(name = "ReIntrodTerapiaResumoVO.obterResumos", query = "from ReIntrodTerapiaResumoVO where pid = :pid"),
		@NamedQuery(name="ReIntrodTerapiaResumoVO.obterItensAuditadosPorPid", query="from ReIntrodTerapiaResumoVO where pid = :pid"),
		@NamedQuery(name="ReIntrodTerapiaResumoVO.obterItensAuditadosPorNumScreening", query="from ReIntrodTerapiaResumoVO  where numScreening = :numScreening"),
		
		@NamedQuery(name = "ReIntrodTerapiaResumoVO.obterResumosPorSite", query = "from ReIntrodTerapiaResumoVO where site = :site"),
		@NamedQuery(name="ReIntrodTerapiaResumoVO.obterItensAuditadosPorPidPorSite", query="from ReIntrodTerapiaResumoVO where pid = :pid and site = :site"),
		@NamedQuery(name="ReIntrodTerapiaResumoVO.obterItensAuditadosPorNumScreeningPorSite", query="from ReIntrodTerapiaResumoVO  where numScreening = :numScreening and site = :site")
	
	})
	public class ReIntrodTerapiaResumoVO implements Resumo, Serializable {

		@Id
		@Column(name = "idreintrodterapia", nullable = false)
		private int idreIntrodTerapia;
		
		@Column(name = "idinclusao", nullable = false)
		private int idInclusao;
		
		@Column(name = "pid", nullable = false)
		private int pid;
		
		@Column(name = "site", nullable = false)
		private Integer site;
		
		@Column(name = "numscreening", nullable = false)
		private String numScreening;
		
		@Transient
		private Integer indice = null;
		
		@Column(name = "dtinclusao", nullable = false)
		@Temporal(TemporalType.DATE)
		private Date dtInclusao;
		
		@Transient
		private String identificacao = null;
		
		
		public int getidreIntrodTerapia() {
			return idreIntrodTerapia;
		}

		public void setidreIntrodTerapia(int idreIntrodTerapia) {
			this.idreIntrodTerapia = idreIntrodTerapia;
		}

		public int getIdInclusao() {
			return idInclusao;
		}

		public void setIdInclusao(int idInclusao) {
			this.idInclusao = idInclusao;
		}

		public Integer getIndice() {
			return indice;
		}

		public void setIndice(Integer indice) {
			this.indice = indice;
		}

		public Date getDtInclusao() {
			return dtInclusao;
		}

		public void setDtInclusao(Date dtInclusao) {
			this.dtInclusao = dtInclusao;
		}

		public String getIdentificacao() {
			return identificacao;
		}

		public void setIdentificacao(String identificacao) {
			this.identificacao = identificacao;
		}

		public void setPid(int pid) {
			this.pid = pid;
		}



		public String getNumScreening() {
			return numScreening;
		}

		public void setNumScreening(String numScreening) {
			this.numScreening = numScreening;
		}

		@Override
		public int getPid() {

			return pid;
			
		}
		
		public Integer getSite() {
			return site;
		}

		public void setSite(Integer site) {
			this.site = site;
		}

		@Override
		public int getId() {

			return getidreIntrodTerapia();
			
		}
		
		@Override
		public Form getForm(){
			return FormUtil.FormsEnum.REINTRODTERAPIA.getForm();
		}

	}

